/*
    公共的请求方法
*/
import base from './base'
import axios from '@/utils/request'
const api = {
    /*
       1. 获取推荐音乐--
    */
   getMusic(){
    return axios.get(base.musicUrl)
   },
   /*
      2. 获取最新音乐
   */
  getNewSong(){
    return axios.post(base.newsong,{
        params: 'eAgihX2MneOHxpkORUgrQA6Y1GOIfZH54TOGeiBdH3rpeAiUou9tFjBTz0O2FjnZ',
        encSecKey:'64122da7954bce11479df267020b84de7609cb249f7ae36f3dcf7c3a6d2ab75b8585931d6835a8604b16bea87f128a58229f7f20603355ee307f5a30d274eb88587eb5a0ab657a837a3f69683b86d193b26af066cec0e04f8d43a4a2cd11ff2ef21f508a9ebf33aebbe6a08d38c03e9f646a187db645588c8f6c0b07385e2e7c'
    })
  },
  /*
      3. 热歌榜列表数据
   */
  getPlaylist(){
    return axios.post(base.playlist,{
      params:'OuS27p1vGvux+0i5Xnsdp2WqfvBfzNdIwjxwGqQ/urEmvm/NgWT0TEpefQXG2Ier',
      encSecKey: 'c9bbd7666e9354678b6d5e52782e6cc05b50b6216b423b46d7c9d4bf31ee521f421b6b27a4300da581c916205d3d1296deb8ab4f115c8b69c597ecf62fa54556ef344675826e4d592009db002095dacb3c191e46904d8ed319d5eb7bb9602c2472ef1d87cb9cf92e4d4e2797bbd180aeb16800707eb1a8da28ba78d1cacc6bbf'
    })
  },
  /*
      4. 搜索热词 hotSearch
  */
  hotSearch(){
    return axios.post(base.hotSearch,{
      params:'Q57N0WmTGUhFful8qhzqlaSpDl6xXHX9A8uEdePrA3o=',
      encSecKey: '7d6f4833a59550315148c314ca8f5a76022c124cd02048d270ddad9cf8995a7852ca49bc276f204b8d25f5bcd6a331d19a5f6944e26e16a057d8b7c4cf338e0bd6310083885468f701d354fb34e90fd94023ddbf863352e739206eb546745fdf781f5c42493d8f0c83cc31bda4b372f5b77aa532e277935432533549244500f3'
    })
  },
  /*
      5. 搜索接口
        请求方式      get
        参数     是   keywords     string    关键字
        参数     是   type         string    'mobile'   移动端
        params={ }对象
  */
  search(params){
    return axios.get(base.search,{
      params
    })
  },
  /*
      6. 首页-推荐歌单-列表界面 
      musicplaylist
      进入推荐--歌单列表界面的歌曲就是固定的内容了  不是随id参数变化的 因为加密没有处理
  */
 musicplaylist(){  // params = {id:xxx}
  // return axios.get(base.musicplaylist,{params})
  return axios.post(base.musicplaylist,{
      params:'J6mTBHMAiVrmjkJcylNGIkMse6/Z6v+gAFZo7CFPiVfcxY6eWKMywBPEErhLQViCgJED8WtiUWeqp/JOCG41fKAW4TI4anjKSZGAz9u01Vo=',
      encSecKey: '8077f2c90d63b5a4038e15ccf9c3e94ddacceef11162bb11fb1b17bd566279667bae3fb4171c1dea3ca4bb2181866d20f2c30e81fabb5670a40a52b99ac085bf988ee11914418ca430d319a5950ec6cc5c797516216d31d548db3318bdcdd83a073b6b942bc377e2dfc79ac85a5308a20a204cd89aede0b46243f3a7bdc9acc0'
    })
 },
  /*
      7. 音乐
      id:xxx   songUrl
  */
 songUrl(){
    return axios.post(base.songUrl,{
      params:'We4qj5PuHEjtz5s8CDkCUK6CJuakZpSbxIKt25ZWcELSjDTlfJFh801m95gGxYN4M8GGxn6BLLTFi03UbNs+1MjHB1nBfQAPeaiAs3SVYudzbkXV+IOMu5yJ2THyK/S/',
      encSecKey: '9db85f3750b03b106771087d27d04539efc93b75aaa8a76e26e087e701b0c2a5c721f71a0a388e12888e61d4cd8662cb3353619887ca593f73c17ca1a0bae2fe58f2b1233d025436a1c4c90031404e748f62aa279c4f05bd1bff3629fbee059c86210fb1d1c0dac2a6d8559105a69c4cb6859271782b5c21ce2d2030426f6074'
    })
  },
  /*
      8. 歌词
      id
  */
  getLyric(params){
    return axios.get(base.lyric,{
      params
    })
  }
  
}
export default api